<?php
/**
 * @package examples
 */
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

header('Content-Type:text/html; charset=UTF-8');
$location = 'http://jp-anaska/ZFBook/html/webservice/rest/';
$client   = new Zend_Rest_Client($location);
?>


<h3>Salles disponibles :</h3>
<ul>
<?php foreach ($client->getRooms()->get() as $room) : ?>
 <li><?php echo $room->id . ' : ' . $room->name; ?></li>
<?php endforeach; ?>
</ul>
<h3>Date de début des réservations enregistrées :</h3>
<ul>
<?php $reservations = $client->getReservations('2008-09-01 10:00:00', '2008-09-30 10:00:00');
$results = $reservations->get()->getReservations;
foreach ($results->children() as $result) : 
    echo "<li>", $result->date_begin,"</li>";
endforeach;
?>
</ul>